package com.galudisu.jooq

import com.galudisu.{AsyncPoolsException, Config}

/**
  * @author galudisu
  */
class ConfiguredFactory(poolConfig: com.typesafe.config.Config) extends AbstractFactory with Config {
  override val url     : String = poolConfig.get("url", "")
  override val user    : String = poolConfig.get("user", "")
  override val password: String = poolConfig.get("password", "")
  override val driver  : String = poolConfig.get("driver", throw new AsyncPoolsException(s"Missing driver configuration"))
}
